<!--
- Author:  LiShibin.
- Date:    2017/8/10 0010.
- File:    article.
-->
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title></title>
  <style>
    .spinner {
      /*margin: 100px auto 0;*/
      width: 150px;
      text-align: center;
    }

    .spinner > div {
      width: 30px;
      height: 30px;
      background-color: #67CF22;

      border-radius: 100%;
      display: inline-block;
      -webkit-animation: bouncedelay 1.4s infinite ease-in-out;
      animation: bouncedelay 1.4s infinite ease-in-out;
      /* Prevent first frame from flickering when animation starts */
      -webkit-animation-fill-mode: both;
      animation-fill-mode: both;
    }

    .spinner .bounce1 {
      -webkit-animation-delay: -0.32s;
      animation-delay: -0.32s;
    }

    .spinner .bounce2 {
      -webkit-animation-delay: -0.16s;
      animation-delay: -0.16s;
    }

    @-webkit-keyframes bouncedelay {
      0%, 80%, 100% {
        -webkit-transform: scale(0.0)
      }
      40% {
        -webkit-transform: scale(1.0)
      }
    }

    @keyframes bouncedelay {
      0%, 80%, 100% {
        transform: scale(0.0);
        -webkit-transform: scale(0.0);
      }
      40% {
        transform: scale(1.0);
        -webkit-transform: scale(1.0);
      }
    }
  </style>
</head>
<body>
  <div id="loader" style="display: none; position: absolute; width: 150px;height: 100px; text-align: center; top: 50%; left: 50%; margin-left: -75px; margin-top: -50px">
    <div class="spinner">
      <div class="bounce1"></div>
      <div class="bounce2"></div>
      <div class="bounce3"></div>
    </div>
    <p style="font-size:16px; color:#aaa; text-align: center">正在加载中...</p>
  </div>
</body>
<!--<script src="https://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/2.5.1/vconsole.min.js"></script>-->
<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://qiyukf.com/script/2565b957dfe5bc21ce45062c883012fe.js"></script>
<script>
  var ApiUrl = 'http://shop.fjjpny.com/mobile'

  var memberId = getQueryString('memberId')
  var loading = setTimeout(function () {
    $('#loader').show()
  }, 1000)
  ysf.open()

  $.ajax({ // 获取邀请人信息
    type: 'post',
    url: ApiUrl + '/index.php?act=article_detail&op=memberInfo',
    dataType: 'json',
    data: {id: memberId},
    cache: false,
    success: function (memberInfo) {
      window.clearTimeout(loading)
      console.log(1111)
      // 网易七鱼聊天客户配置
      ysf.config({ // eslint-disable-line
        uid: memberInfo.member_id,
        name: memberInfo.member_name,
        mobile: memberInfo.member_mobile
      })
      console.log(2222)
      var url = 'https://qiyukf.com/client?k=2565b957dfe5bc21ce45062c883012fe&u='+memberId+'&n='+memberInfo.member_name+'&t=金品农业&m=' + memberInfo.member_mobile
      window.location.replace(url)
      console.log(3333)
    }
  })

  function getQueryString(name) {
    var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
    var r = window.location.search.substr(1).match(reg)
    if (r != null) {
      return unescape(r[2])
    }
    return null
  }</script>
</html>